<!--
 * @Author: Bobby
 * @Date: 2021-12-30 10:01:42
 * @LastEditTime: 2022-03-16 16:04:11
 * @LastEditors: Bobby
 * @Description:
 * @FilePath: \wms-v2\src\components\toapp.vue
 * CIMC-V2
-->
<template>
  <div></div>
</template>

<script>
  import { defineComponent } from 'vue'
  // import { setStorage } from '@/utils/tools'
  import qs from 'qs'
  export default defineComponent({
    name: 'ToApp',
    data() {
      return {}
    },
    computed: {},
    created() {
      // setStorage('token', this.$route.query['tk'])

      this.$store.dispatch('user/setToken', this.$route.query['tk'])
      this.$store.dispatch('user/setLanguage', this.$route.query['language'])
      this.$store.dispatch('user/setUid', this.$route.query['uid'])
      // this.$store.dispatch('user/setFirstWareHoseId', this.$route.query['warehouseId'])
      // this.$store.dispatch('user/setOrgCode', this.$route.query['orgCode'])
      this.$store.dispatch('user/setAppId', this.$route.query['appid'])
      this.$store.dispatch('user/setAppCode', this.$route.query['appCode'])
      this.$store.dispatch('user/setbusinessCode', qs.parse(this.$route.query).appInfo)
      location.href = `${this.$route.query['domain']}?systemApp=${this.$route.query['systemApp']}`

      console.log('this.$route.query', qs.parse(this.$route.query))
    },
    methods: {},
  })
</script>
